//
//  Config.h
//  GoldOperationClient
//
//  Created by yaxue wang on 16/8/1.
//  Copyright © 2016年 展鸿科技. All rights reserved.
//
#ifndef Config_h
#define Config_h

#pragma mark - 设置模式
#ifdef DEBUG
#define C_DEBUG // 调试模式
#endif

//发布的时候隐藏这个
//#define C_TestData

#ifdef C_DEBUG
#pragma mark 调试模式
#define echo(m) NSLog(@"____Begin____\n%@\n____End____", m)
#define echoint(int) NSLog(@"%d", int)

#else
//#pragma mark 发布模式
#define echo(m)
#define echoint(int)
#endif

#ifdef C_TestData
//测试接口
#define APIURL @"http://njddwtest.pshiwan.com/kingop-base-app"
//@"http://www.91betterwei.com/kingop-base-app"
#define WebURL @"http://njddwtest.pshiwan.com/kingop-base-app"
#define ImgURL @"http://njddwtest.pshiwan.com/kingop-base-app"

#else
//发布接口
#define APIURL @"http://jspsbc.bestddwei.com/kingop-base-app"
#define WebURL @"http://jspsbc.bestddwei.com/kingop-base-app"
#define ImgURL @"http://jspsbc.bestddwei.com/kingop-base-app"

#endif

#define C_V @[@"1.1.0", @"1.1.1", @"1.1.2", @"1.1.3"]

#define C_V_1_1_2 @"1.1.2"

#define C_Current_Version(v) [C_V indexOfObject:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]] >= [C_V indexOfObject:v]
#define iOS7Later ([UIDevice currentDevice].systemVersion.floatValue >= 7.0f)
#define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)

#define WindowWidth [UIScreen mainScreen].bounds.size.width
#define WindowHeight [UIScreen mainScreen].bounds.size.height
#pragma mark - NSUserDefault
#define NSUD_UUID               @"KingOP_UUID"
#define NSUD_Token              @"KingOP_Token"

//个人中心缓存
#define NSUD_Mobile              @"mobile"
#define NSUD_Name                @"name"
#define NSUD_ServiceName         @"serviceName"
#define NSUD_Province            @"province"
#define NSUD_City                @"city"
#define NSUD_HeadImg             @"headImg"
#define NSUD_HomeCache           @"homeCache"
#define NSUD_HistoryCache        @"historyCache"
#define NSUD_Uuid                @"uuid"


//七牛信息
//链接
#define qnDomain                @"qnDomain"
//空间名
#define qnScope              @"qnScope"
//AK
#define qnAk                 @"qnAk"
//sk
#define qnSk                 @"qnSk"
//是否通过审核
#define NSUD_state            @"state"

//缓存信息
#define NSUD_CacheDate          @"Hipay_CacheDate"


#pragma mark - NSNotification
//推送信息
#define NSN_NewPushMessage      @"NSN_NewPushMessage"
#define NSN_Terminate           @"NSN_Terminate"
#pragma mark - 方法宏

#define PostNotification(name) [[NSNotificationCenter defaultCenter] postNotificationName:name object:nil]
#define PostOBJNotification(name, obj) [[NSNotificationCenter defaultCenter] postNotificationName:name object:obj]
#define AddNotification(fun, n) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fun) name:n object:nil]
#define RemoveNotification(n) [[NSNotificationCenter defaultCenter] removeObserver:self name:n object:nil]
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
//取大值
#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
//取小值
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))
#define F(size) [UIFont systemFontOfSize:size + (SCREEN_MAX_LENGTH >= 586.0 ? (SCREEN_MAX_LENGTH >= 736.0 ? 2: 1) : 0)]
#define FF(size) [UIFont systemFontOfSize:size]
#define C(color)    [CClass getColor:color]
#define F_NULL(str, place) str && str !=[NSNull null] && ![str isEqualToString:@""] ? str : place

#define F_NSpace(str) F_NULL(str, @"")
#define F_Money(str) [NSString stringWithFormat:@"%.2f", [str floatValue] / 100]
//做大小 颜色
#define AF(size, color) @{NSFontAttributeName:F(size), NSForegroundColorAttributeName:C(color)}
#define  LineColor  [UIColor colorWithRed:241/255.0 green:241/255.0 blue:241/255.0 alpha:1]
#define Yellow [UIColor colorWithRed:245/255.0 green:172/255.0 blue:84/255.0 alpha:1]
#define MainColor [UIColor colorWithRed:253/255.0 green:96/255.0 blue:61/255.0 alpha:1]
#define FontColor [UIColor colorWithRed:79/255.0 green:79/255.0 blue:79/255.0 alpha:1]
#define LightFontColor [UIColor colorWithRed:168/255.0 green:167/255.0 blue:167/255.0 alpha:1]
#define BackColor [UIColor colorWithRed:255/255.0 green:251/255.0 blue:251/255.0 alpha:1]
#define SendColor [UIColor colorWithRed:252/255.0 green:156/255.0 blue:42/255.0 alpha:1]
#import "UIControl+BlocksKit.h"
#import "CColor+UIColor.h"
#import "Common.h"
#import "SDImageCache.h"
#import "UIImageView+WebCache.h"
#import "TPKeyboardAvoidingScrollView.h"
#import "XWScanImage.h"
#import "CTextField.h"


#endif /* Config_h */
